<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>块级元素</title>
    <style>
        div {
            border: red 2px solid;
            /* text-align: center; */
        }

        p {
            height: 100px;
            width: 200px;
            margin: auto;
            text-align: center;
            line-height: 100px;
        }
    </style>
</head>

<body>
    <div>
        <!-- img标签行内块元素，p标签是块级元素 -->
        <img src="gaicibi.png">
        <p>我是文本</p>
    </div>
</body>

</html>